<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>窗口的特征</title>
		<script>
			function showWin(){
				alert("窗口左顶点的位置："+window.screenLeft+","+window.screenTop);
				alert("窗口大小："+window.outerHeight+"X"+window.outerWidth);
				alert("窗口内部大小："+window.innerHeight+"X"+window.innerWidth);
			}
			function goBuy(){
				window.location="https://www.baidu.com";
			}
			function closeWin(){
				if(window.confirm("真的要关闭？"))
				{
					window.close();
					window.open("js-window.html");
				} 
			}
			function openWin(){
				window.open("https://www.jd.com","jd","left=400px,top=300px,height=200px,width=499px");
			}
			
		</script>
	</head>
	<body>
		<button type="button" onclick="showWin()">窗口特征</button>
		<button type="button" onclick="goBuy()">去淘宝</button>
		
		<button type="button" onclick="closeWin()">关闭</button>
		
		<button type="button" onclick="openWin()">打开新窗口</button>
		
		<button type="button" onclick="window.history.back()">返回</button>
	</body>
</html>